<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
		<script src="../../js/easyui/jquery.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="../../js/easyui/jquery.easyui.min.js" type="text/javascript" charset="utf-8"></script>
		<link rel="stylesheet" type="text/css" href="../../js/easyui/themes/default/easyui.css" />
	</head>

	<body>
		<div data-options="region:'center'" border="false">
			<table id="dg"></table>
		</div>
	</body>
	<script type="text/javascript">
		function formatNum() {

		}

		//初始化datagrid
		function initDatagrid() {
			var arr_data = [{
				"create_time": "2018-05-24 11:29:15",
				"id": 52,
				"is_success": "成功",
				"remark": "导入成功！",
				"oil_money": 200,
				"order_num": "180524105136596470"
			}, {
				"create_time": "2018-05-23 19:51:20",
				"id": 51,
				"is_success": "成功",
				"remark": "导入成功！",
				"oil_money": 200,
				"order_num": "180523034604025203"
			}, {
				"create_time": "2018-05-23 18:37:03",
				"id": 39,
				"is_success": "失败",
				"remark": "订单号必须存在!",
				"oil_money": 100,
				"order_num": "180522015325368887"
			}, {
				"create_time": "2018-05-23 11:16:19",
				"id": 41,
				"is_success": "失败",
				"remark": "订单号必须存在!",
				"oil_money": 100,
				"order_num": "180522015325364978\n"
			}, {
				"create_time": "2018-05-23 00:36:21",
				"id": 49,
				"is_success": "成功",
				"remark": "导入成功！",
				"oil_money": 200,
				"order_num": "180523122648313130"
			}, {
				"create_time": "2018-05-23 00:06:46",
				"id": 48,
				"is_success": "成功",
				"remark": "导入成功！",
				"oil_money": 300.8,
				"order_num": "180522115643689874"
			}, {
				"create_time": "2018-05-22 23:29:05",
				"id": 47,
				"is_success": "成功",
				"remark": "导入成功！",
				"oil_money": 200,
				"order_num": "180522112122720701"
			}, {
				"create_time": "2018-05-22 23:25:33",
				"id": 46,
				"is_success": "失败",
				"remark": "冻结异常！",
				"oil_money": 200,
				"order_num": "180522101145880760"
			}, {
				"create_time": "2018-05-22 23:09:21",
				"id": 45,
				"is_success": "成功",
				"remark": "导入成功！",
				"oil_money": 100,
				"order_num": "180522073117320921"
			}, {
				"create_time": "2018-05-22 19:20:47",
				"id": 44,
				"is_success": "成功",
				"remark": "导入成功！",
				"oil_money": 100,
				"order_num": "180522060638451773"
			}, {
				"create_time": "2018-05-22 18:53:16",
				"id": 43,
				"is_success": "成功",
				"remark": "导入成功！",
				"oil_money": 100,
				"order_num": "180522111339723680"
			}, {
				"create_time": "2018-05-22 18:09:01",
				"id": 42,
				"is_success": "成功",
				"remark": "导入成功！",
				"oil_money": 100,
				"order_num": "180522060013087636"
			}, {
				"create_time": "2018-05-22 17:42:03",
				"id": 40,
				"is_success": "成功",
				"remark": "导入成功！",
				"oil_money": 100,
				"order_num": "180522033746798656"
			}, {
				"create_time": "2018-05-22 16:47:04",
				"id": 38,
				"is_success": "成功",
				"remark": "导入成功！",
				"oil_money": 100,
				"order_num": "180522015325364978"
			}, {
				"create_time": "2018-05-22 15:53:28",
				"id": 37,
				"is_success": "成功",
				"remark": "导入成功！",
				"oil_money": 100,
				"order_num": "180522033617590206"
			}, {
				"create_time": "2018-05-22 14:06:04",
				"id": 36,
				"is_success": "成功",
				"remark": "导入成功！",
				"oil_money": 100,
				"order_num": "180522015553916583"
			}, {
				"create_time": "2018-05-22 12:34:36",
				"id": 35,
				"is_success": "成功",
				"remark": "导入成功！",
				"oil_money": 1000,
				"order_num": "180522103653605808"
			}, {
				"create_time": "2018-05-22 09:24:52",
				"id": 25,
				"is_success": "失败",
				"remark": "订单号必须存在!",
				"oil_money": 1.02,
				"order_num": "180154879857458713"
			}, {
				"create_time": "2018-05-22 09:24:52",
				"id": 26,
				"is_success": "失败",
				"remark": "订单号必须存在!",
				"oil_money": 1,
				"order_num": "180154879857458714"
			}, {
				"create_time": "2018-05-22 09:24:52",
				"id": 30,
				"is_success": "失败",
				"remark": "尚未发起冻结到钱包的订单，提示稍后再试!",
				"oil_money": 2,
				"order_num": "151216131521525557"
			}, {
				"create_time": "2018-05-22 09:24:52",
				"id": 31,
				"is_success": "失败",
				"remark": "订单号必须存在!",
				"oil_money": 1.06,
				"order_num": "170512052753237445"
			}, {
				"create_time": "2018-05-22 09:24:52",
				"id": 32,
				"is_success": "失败",
				"remark": "请稍后再试！",
				"oil_money": 2,
				"order_num": "180118115211140801"
			}, {
				"create_time": "2018-05-22 09:24:52",
				"id": 33,
				"is_success": "失败",
				"remark": "尚未发起冻结到钱包的订单，提示稍后再试!",
				"oil_money": 2,
				"order_num": "151217150020906119"
			}, {
				"create_time": "2018-05-22 09:24:52",
				"id": 34,
				"is_success": "失败",
				"remark": "尚未发起冻结到钱包的订单，提示稍后再试!",
				"oil_money": 2,
				"order_num": "151223151701455916"
			}, {
				"create_time": "2018-05-21 16:19:51",
				"id": 28,
				"is_success": "失败",
				"remark": "订单号必须存在!",
				"oil_money": 1.02,
				"order_num": "180154879857462179"
			}, {
				"create_time": "2018-05-21 15:56:32",
				"id": 29,
				"is_success": "失败",
				"remark": "存在重复数据，请核对！",
				"oil_money": 1.01,
				"order_num": "180154879857458712"
			}, {
				"create_time": "2018-05-16 14:15:48",
				"id": 16,
				"is_success": "失败",
				"remark": "订单号必须存在!",
				"oil_money": 260,
				"order_num": "10000000"
			}, {
				"create_time": "2018-05-16 11:44:46",
				"id": 27,
				"is_success": "失败",
				"remark": "订单号必须存在!",
				"oil_money": 11.2,
				"order_num": "180154879857468487"
			}, {
				"create_time": "2018-05-16 09:40:32",
				"id": 24,
				"is_success": "失败",
				"remark": "订单号必须存在!",
				"oil_money": 0.2,
				"order_num": "100"
			}, {
				"create_time": "2018-05-16 09:40:19",
				"id": 15,
				"is_success": "失败",
				"remark": "订单号必须存在!",
				"oil_money": 0.2,
				"order_num": "10000"
			}];
			$('#dg').datagrid({
				//              url: '../../json/datas.json',
				url: 'http://192.168.2.27:8080/zero2_2.0.7/financeSecond.action?method:listPage',
				method: 'post',
				toolbar: '#toolbarId',
				pagination: true,
				pageSize: $("#pageSizeId").val(),
				fit: true,
				fitColumns: true,
				striped: true,
				rownumbers: true,
				singleSelect: true,
				collapsible: true,
				striped: true,
				queryParams: {
					q_isDelete: 0
				},
				columns: [
					[{
						field: "order_num",
						title: "订单号",
						width: 50,
						align: 'center'
					}, {
						field: "oil_money",
						title: '运输油费（元）',
						width: 50,
						align: 'center'
					}, {
						field: "create_time",
						title: '导入时间',
						width: 50,
						align: 'center'
					}, {
						field: "is_success",
						title: '导入状态',
						width: 50,
						align: 'center'
					}, {
						field: "remark",
						title: '备注',
						width: 50,
						align: 'center'
					}]
				]
			});
		}

		$(function() {
			initDatagrid();
		})
		/**
		 * 
		 * 消息框自适应
		 */
		function show (data) {
			$.messager.progress('close');
			$.messager.show({
				title: '处理结果',
				msg: data,
				timeout: 5000,
				showType: 'slide',
				height: 'auto',
				style: {
					'bottom': '0',
					'right': '0',
					'top': '',
					'left': '',
					'word-wrap': 'break-word'
				}
			});
			loadData();
			$("#dd").window("close");
		}
	</script>

</html>